import request from '@/utils/request'


export default{
    orderList(page, size, searchMap) {
        return request({
            url: `manage/order/order/index?page=${page}&size=${size}`,
            method: 'post',
            data:searchMap
        })
    },
    // 发货订单
    paseList(page, size, searchMap) {
        return request({
            url: `manage/order/order/index?page=${page}&size=${size}`,
            method: 'post',
            data:searchMap
        })
    },
    // 退款订单
    refundList(page, size, searchMap) {
        return request({
            url: `manage/order/refund/index?page=${page}&size=${size}`,
            method: 'post',
            data:searchMap
        })
    },
    // 订单详情
    orderDetail(id) {
        return request({
            url: `manage/order/order/detail?id=${id}`,
            method: 'get',
        })
    },
     // 发货
     deliverOrder(data) {
        return request({
            url: `manage/order/order/delivery`,
            method: 'post',
            data:data
        })
    },
    // 核销
    writeOrder(data) {
        return request({
            url: `manage/ticket/ticket/batchVerify`,
            method: 'post',
            data:data
        })
    },
    // 审核
    examineOrder(data) {
        return request({
            url: `manage/order/refund/apply`,
            method: 'post',
            data:data
        })
    },

    // 渠道端订单列表
    channelOrderList(page, size, searchMap) {
        return request({
            url: `manage/order/order/index?page=${page}&size=${size}`,
            method: 'post',
            data:searchMap
        })
    },
    //推送订单到供应商
    pushordertosupplier(data) {
        return request({
            url: `manage/order/order/pushToThreePart`,
            method: 'post',
            data:data
        })
    },
    //取消供应商订单
    cancelsupplierorder(data) {
        return request({
            url: `manage/order/order/cancelOrder`,
            method: 'post',
            data:data
        })
    },
    //推送退款订单 
    pushrefundorder(data) {
        return request({
            url: `manage/order/refund/push`,
            method: 'post',
            data:data
        })
    },
    //取消供应商退款申请
    applicationfordrawback(data) {
        return request({
            url: `manage/order/refund/cancelRefund`,
            method: 'post',
            data:data
        })
    },
    //获取退款物流公司 
    getrefundLogistics(data) {
        return request({
            url: `manage/order/refund/getRefundShipping`,
            method: 'post',
            data:data
        })
    },
    //填写退款物流
    fillinrefundlogistics(data) {
        return request({
            url: `manage/order/refund/sendPackage`,
            method: 'post',
            data:data
        })
    },
    getOrderItemByStored(orderId){
        return request({
            url: `manage/merchant/stored/getDetailByOrderId?order_id=${orderId}`,
            method: 'get'
        })
    },
    cancelRefund(id){
        return request({
            url: `manage/order/refund/cancel?refund_id=${id}`,
            method: 'get'
        })
    }
}
